package main

import (
	"fmt"
	"math/rand"
	"time"
)

// 获取随机的切片
func getRandomSlice(min int, max int, length int) []int {
	// 定义切片
	var s []int
	rand.Seed(time.Now().Unix())
	for i := 0; i < length; i++ {
		s = append(s, rand.Intn(max-min)+max)
	}
	return s
}
func main() {
	s := getRandomSlice(20, 100, 20)
	fmt.Println(s)
}
